GetIndexedSubControl
NEW WITH THE APPEARANCE MANAGER
Returns a handle to a specified embedded control.
pascal OSErr GetIndexedSubControl ( ControlHandle inControl, SInt16 inIndex, ControlHandle* outSubControl);
inControl
- On input, a handle to an embedder control.
inIndex
- On input, a 1-based index--an integer between 1 and the value returned in the
outNumChildren
parameter ofCountSubControls
--indicating the specific control you wish to access.outSubControl
- On output, a pointer to a handle to the embedded control.
- function result
- A result code; see "Result Codes". The result code
errControlIsNotEmbedder
indicates that the embedder control does not support embedding or that embedding is not enabled for that window. If the index passed in is invalid, theparamErr
result code is returned.DISCUSSION
TheGetIndexedSubControl
function is useful for iterating over the control hierarchy. Also, the value of a radio group control is the index of its currently selected embedded radio button control. So, passing the current value of a radio group control intoGetIndexedSubControl
will give you a handle to the currently selected radio button control.SEE ALSO
"Embedding Controls"."Appearance Manager Gestalt Selector Constants".